package com.member.common.enums;

import lombok.Getter;

import java.util.Objects;

@Getter
public enum BizUserStatusEnum {

    OK(0, "启用"),
    DISABLE( 1, "禁用");

    private final Integer key;
    private final String desc;

    BizUserStatusEnum(Integer key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public static BizUserStatusEnum getByKey(Integer _key) {
        for (BizUserStatusEnum item : BizUserStatusEnum.values()) {
            if (Objects.equals(item.getKey(), _key)) {
                return item;
            }
        }
        return null;
    }
}
